<?php

declare(strict_types=1);

namespace App\Controller\Pda\v1;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Service\UserService\CashManagerService;
use Hyperf\Di\Annotation\Inject;
use App\Middleware\PdaMiddleware;
use Hyperf\HttpServer\Annotation\Middleware;

/**
 * 登录控制器
 * @Controller(prefix="/pda/v1/login")
 * @Middleware(PdaMiddleware::class)
 */
class LoginController extends AbstractController
{
    
    
    /**
     * 登录接口
     * @RequestMapping(path="index", methods="post")
     */
    public function index(RequestInterface $request ,CashManagerService $authService)
    {
        return $authService->pdaLogin($request->getParsedBody());
    }
    
}
